package com.xiaxiang.xiawan.FunPhoto.Adapter;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.xiaxiang.xiawan.NetBean.FunPhotoNetBean;
import com.xiaxiang.xiawan.R;

import cn.drj.myutils.adapter.DRJBaseAdapter;
import cn.drj.myutils.adapter.DRJViewHolderHelper;

/**
 * Created by gz on 2016/9/11.
 */
public class FunAdapter extends DRJBaseAdapter<FunPhotoNetBean.RowsEntity> {

    public FunAdapter(Context context) {
        super(context, R.layout.adp_item_fun);
    }

    @Override
    protected void setItemChildListener(DRJViewHolderHelper viewHolderHelper) {

    }

    @Override
    public void fillData(DRJViewHolderHelper viewHolderHelper, int position, FunPhotoNetBean.RowsEntity model) {
        viewHolderHelper.setText(R.id.name, model.getName());
        Glide.with(mContext).load(model.getUrl()).
                into((ImageView) viewHolderHelper.getView(R.id.icon));
    }
}